local skynet = require "skynet"
local filelog = require "filelog"
local msghelper = require "ranklistsvrhelper"
local timetool = require "timetool"
local tabletool = require "tabletool"
local ranklistredismng = require"ranklistredismng"
local base = require "base"
local playerdatadao = require "playerdatadao"
--[[
	updaterankinfo ={
		rank_key = 0,
		rid   = 0,
		rankval_addtype = 1,--1更新 2直接覆盖数据
		rankval = 0,
		rolename = "",
		logo ="",
		addgamenumber = 0,
		addmttnumber  = 0
	}	
--]]


local RankListsvrNotice = {}

function RankListsvrNotice.process(session, source, event, ...)
	local f = RankListsvrNotice[event] 
	if f == nil then
		return
	end
	f(...)
end


function RankListsvrNotice.init()
end


-- @des    上报更新游戏数据
-- @author lion
-- @para   updaterankinfo(rank_key,rid...)
function RankListsvrNotice.update(updaterankinfo)
	ranklistredismng.update_realtimedata(updaterankinfo)
end



-- @des    测试数据
-- @author lion
function RankListsvrNotice.getranklist()

	skynet.sleep(1000)
	--print("RankListsvrNotice.getranklist----------------start")
	ranklistredismng.get_ranklist_realtime(1,0, 6)
	--print("RankListsvrNotice.getranklist----------------end")

	skynet.sleep(1000)
	--print("RankListsvrNotice.getranklist----------------start--")
	ranklistredismng.get_ranklist_stable(1,0, 6)
	--print("RankListsvrNotice.getranklist----------------end--")
end


return RankListsvrNotice